package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Service;

/**
 * @author karidyang
 */
@Service
@Slf4j
public class Customer {

    @StreamListener(Sink.INPUT)
    public void receive(String message) {
        log.info("receive : {}", message);
    }

    @StreamListener(OtherSink.INPUT)
    public void receive2(String message) {
        log.info("receive other: {}", message);
    }
}
